import request from '@/utils/request'
// 封装并暴露分页查询仓库请求接口
export const getPageWareHouseAPI = () => {
  return request({
    url: '/warehouse/page'
  })
}

// 封装并暴露修改仓库信息请求接口
export const updateWareHouserAPI = (data) => {
  return request.put('/warehouse', data)
}

// 封装并暴露删除仓库信息请求接口
export const delWareHouseAPI = (id) => {
  return request({
    url: '/warehouse',
    method: 'delete',
    params: {
      ids: [...id]
    }
  })
}

// 封装并暴露新增仓库请求接口
export const addWareHouseAPI = (data) => {
  return request.post('/warehouse', data)
}

// 封装并暴露新增仓库请求接口
export const editWareHouseAPI = (data) => {
  return request.put('/warehouse', data)
}

// 封装并暴露获取仓库详情信息请求接口
export const getWareHouseDetailsAPI = (id) => {
  return request(`/warehouse/${id}`)
}
